<!-- 此tpl如使用script标签渲染，请遵循layui.laytpl语法，此页面，支持PHP语法-->
<script type="text/html" id="barDemo">
    <div class="layui-btn-container">
        {foreach name="right_buttons" key="key" item="vo"}
            {{#  if(d.status == '待审核'){ }}
            <a class="{$vo.class} right_button" lay-event="{$vo.json}" style="background-color: #FF5722">审核</a>
            {{#  } else { }}
            <a class="{$vo.class} right_button" lay-event="{$vo.json}">{$vo.title}</a>
            {{#  } }}
        {/foreach}
    </div>
</script>

<input type="hidden" id="update_url" value="{:url('update')}"/>
<!-- 开关状态栏 -->
{foreach name="switch_tool" item="vo"}
    <script type="text/html" id="{$vo.name}">
        <input type="checkbox" name="{$vo.name}" value="{{d.{$vo.pk}}}" lay-filter="status" lay-skin="switch" lay-text="{$vo.text}" {{ d.{$vo.name}== 1 ? 'checked' : '' }}>
    </script>
{/foreach}

<!-- 排序Bar -->
{foreach name="sort_tool" item="vo"}
    <script type="text/html" id="sort_{$vo.name}">
        <input type="text" data-key="{$vo.name}" data-id="{{d.{$vo.pk}}}" data-url="{$vo.url}" value="{{d.{$vo.name}}}" class="layui-input x-sort tableInput"/>
    </script>
{/foreach}

<script id="_userTpl" type="text/html">
    {{#  if(d.user){ }}
    <div>{{d.user.code}} - {{d.user.nickname}} - {{d.user.mobile}}</div>
    {{#  } else { }}
    <div> - </div>
    {{#  } }}
</script>

<script id="_takeUserTpl" type="text/html">
    {{#  if(d.take){ }}
    <div>{{d.take.code}} - {{d.take.nickname}} - {{d.take.mobile}}</div>
    {{#  } else { }}
    <div> - </div>
    {{#  } }}
</script>

<script id="_buyerTpl" type="text/html">
    {{#  if(d.buyer){ }}
    <div>{{d.buyer.code}} - {{d.buyer.nickname}} - {{d.buyer.mobile}}</div>
    {{#  } else { }}
    <div> - </div>
    {{#  } }}
</script>

<script id="_sellerTpl" type="text/html">
    {{#  if(d.seller){ }}
    <div>{{d.seller.code}} - {{d.seller.nickname}} - {{d.seller.mobile}}</div>
    {{#  } else { }}
    <div> - </div>
    {{#  } }}
</script>

<script id="videoTpl" type="text/html">
    <div><a href="javascript:;" class="openVideo" data-value="{{d.video}}">点击查看</a></div>
</script>

<script id="imagesTpl" type="text/html">
    <div><a href="javascript:;" class="openShowImg" data-value="{{d.images}}">点击查看</a></div>
</script>

<script id="imageTpl" type="text/html">
    <div><a href="javascript:;" class="openShowImg" data-value="{{d.image}}">点击查看</a></div>
</script>

<script id="iconTpl" type="text/html">
    <div><a href="javascript:;" class="openShowImg" data-value="{{d.icon}}">点击查看</a></div>
</script>

<script id="logoTpl" type="text/html">
    <div><a href="javascript:;" class="openShowImg" data-value="{{d.logo}}">点击查看</a></div>
</script>

<script id="editorTpl" type="text/html">
    <div><a href="javascript:;" class="openEditor" data-value="{{d.content}}">点击预览</a></div>
</script>

<script id="addressTpl" type="text/html">
    <div>{{d.p?d.p.title:''}}{{d.c?d.c.title:''}}{{d.d?d.d.title:''}}{{d.details}}</div>
</script>